<template>
  <div style="text-align: left">
    <h4 class="text-size-16">
      {{ projectInfo.title }}
      <span v-if="projectInfo.onlineUrl" class="text-green-12">(已上线)</span>
    </h4>
    <h4 class="text-size-8">{{ projectInfo.postInfo }}</h4>
    <!-- gitee地址 -->
    <a-row v-if="projectInfo.giteeUrl">
      <a-col :span="1"></a-col>
      <a-col :span="2.5">Gitee &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a-col>
      <a-col :span="0.5">：</a-col>
      <a-col
        ><a>{{ projectInfo.giteeUrl }}</a></a-col
      >
    </a-row>
    <!-- 线上地址 -->
    <a-row v-if="projectInfo.onlineUrl">
      <a-col :span="1"></a-col>
      <a-col :span="2.5">线上地址</a-col>
      <a-col :span="0.5">：</a-col>
      <a-col
        ><a>{{ projectInfo.onlineUrl }}</a> 用户名：{{
          projectInfo.onlineUsername
        }}；密码：{{ projectInfo.onlinePassword }}
      </a-col>
    </a-row>
    <!-- 项目导航 -->
    <a-row v-if="resumeNavigationUrl">
      <a-col :span="1"></a-col>
      <a-col :span="2.5">项目导航</a-col>
      <a-col :span="0.5">：</a-col>
      <a-col
        ><a>{{ resumeNavigationUrl }}</a></a-col
      >
    </a-row>

    <br />
    <a-divider
      class="divider-margin-6"
      :style="{ borderColor: lineColor }"
      dashed
    />
    <!-- 项目描述 -->
    <div v-if="projectInfo.describeList && projectInfo.describeList.length > 0">
      <h4 class="text-size-16">项目描述：</h4>

      <TableList :showLine="false" :list="projectInfo.describeList" />
    </div>

    <br />
    <a-divider
      class="divider-margin-6"
      :style="{ borderColor: lineColor }"
      dashed
    />
    <!-- 项目架构 -->
    <div
      v-if="projectInfo.structureList && projectInfo.structureList.length > 0"
    >
      <h4 class="text-size-16">项目架构：</h4>
      <TableList :showLine="false" :list="projectInfo.structureList" />
    </div>

    <br />
    <a-divider
      class="divider-margin-6"
      :style="{ borderColor: lineColor }"
      dashed
    />
    <!-- 个人职责 -->
    <div v-if="projectInfo.dutyList && projectInfo.dutyList.length > 0">
      <h4 class="text-size-16">个人职责：</h4>
      <TableList :showLine="false" :list="projectInfo.dutyList" />
    </div>
    <br />
    <a-divider
      class="divider-margin-6"
      :style="{ borderColor: lineColor }"
      dashed
    />
  </div>
</template>
<script setup>
import TableList from "@/components/TableList";

// 子组件
// eslint-disable-next-line no-undef
defineProps({
  projectInfo: Object,
  resumeNavigationUrl: {
    type: String, // 校验类型
    required: false, // 是否必填
    default: "http://localhost:8080", // 默认值
  },
  // 分隔线颜色
  lineColor: {
    type: String, // 校验类型
    required: false, // 是否必填
    default: "#7cb305", // 默认值
  },
});
</script>

<style scoped>
.text-green-12 {
  font-size: 12px;
  color: green;
}
</style>
